Skip to content

Conversation

lolgab
Copy link
Contributor

@lolgab lolgab commented Oct 4, 2025

No description provided.

buildRootDir / s".$millVersionName",
buildRootDir / ".config" / millVersionName
).collectFirstSomeM(fileAlg.readFile).map(_.flatMap(parser.parseMillVersion))
val fromBuildFile = List(buildRootDir / "build.mill", buildRootDir / "build.mill.scala")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

build.sc is missing here. Also build.mill.yaml.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

build.sc is not here since it doesn't have a yaml header to parse.
I'm going to add build.mill.yaml. But, is it already supported? Maybe can be added in a follow up PR?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I wasn't aware build.sc does not support a YAML header. I think that's nowhere documented. build.mill.yaml is supported in Mill main and snapshot releases, but has a slightly different format (pure YAML without the comment-prefix), so no need to add it right now. I was just mentioning it for completeness.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked, Mill does read YAML-headers from build.sc files. We should also add support for them.

Copy link
Member

@lefou lefou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Maybe, the extra empty lead line in the YAML frontmatter tests is superfluous.

@lefou lefou mentioned this pull request Oct 14, 2025
@lolgab lolgab marked this pull request as ready for review October 14, 2025 14:07
@lefou
Copy link
Member

lefou commented Oct 14, 2025

@mzuehlke Could you please approve the CI workflow for this PR?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MillAlgTest needs fix:

==> X org.scalasteward.core.buildtool.mill.MillAlgTest.getDependencies, version < 0.11  0.04s munit.ComparisonFailException: modules/core/src/test/scala/org/scalasteward/core/buildtool/mill/MillAlgTest.scala:32
31:    )
32:    assertEquals(state, expected)
33:  }
values are not the same
=> Diff (- expected, + obtained)
         "read",
-        "/tmp/scala-steward/workspace/lihaoyi/fastparse/.mill-version"
+        "/tmp/scala-steward/workspace/lihaoyi/fastparse/build.mill"
       )
         "read",
-        "/tmp/scala-steward/workspace/lihaoyi/fastparse/.config/mill-version"
+        "/tmp/scala-steward/workspace/lihaoyi/fastparse/build.mill.scala"
       )
       cmd = List(
+        "read",
+        "/tmp/scala-steward/workspace/lihaoyi/fastparse/build.sc"
+      )
+    ),
+    Cmd(
+      cmd = List(
         "write",
    at munit.FunSuite.assertEquals(FunSuite.scala:13)
    at org.scalasteward.core.buildtool.mill.MillAlgTest.$anonfun$new$1(MillAlgTest.scala:32)
==> X org.scalasteward.core.buildtool.mill.MillAlgTest.getDependencies, 0.11 <= version < 0.12  0.004s org.scalasteward.core.buildtool.mill.parser$CirceParseError: Failed to decode Modules
    at org.scalasteward.core.buildtool.mill.parser$.$anonfun$parseModules$1(parser.scala:43)
    at cats.syntax.EitherOps$.leftMap$extension(either.scala:193)
    at org.scalasteward.core.buildtool.mill.parser$.parseModules(parser.scala:43)
    at org.scalasteward.core.buildtool.mill.MillAlg.$anonfun$getProjectDependencies$1(MillAlg.scala:85)
    at cats.data.Kleisli.$anonfun$flatMap$4(Kleisli.scala:75)
    at set @ org.scalasteward.core.io.MockProcessAlg$.$anonfun$create$6(MockProcessAlg.scala:22)
    at blocking @ org.scalasteward.core.io.FileAlg$$anon$1.readResource(FileAlg.scala:111)
    at get @ org.scalasteward.core.io.MockProcessAlg$.$anonfun$create$2(MockProcessAlg.scala:15)
    at flatMap @ org.scalasteward.core.mock.package$.getFlatMapSet(package.scala:32)
    at flatMap @ org.scalasteward.core.mock.package$.getFlatMapSet(package.scala:32)
    at set @ org.scalasteward.core.io.MockProcessAlg$.$anonfun$create$6(MockProcessAlg.scala:22)
    at map @ org.scalasteward.core.io.MockProcessAlg$.$anonfun$create$14(MockProcessAlg.scala:37)
    at map @ org.scalasteward.core.io.MockProcessAlg$.$anonfun$create$7(MockProcessAlg.scala:23)
    at flatMap @ org.scalasteward.core.io.MockProcessAlg$.$anonfun$create$7(MockProcessAlg.scala:23)
    at set @ org.scalasteward.core.io.MockProcessAlg$.$anonfun$create$6(MockProcessAlg.scala:22)
Caused by: ParsingFailure: exhausted input

@lolgab
Copy link
Contributor Author

lolgab commented Oct 15, 2025

@exoego Can you approve the workflow again? I fixed the test.

@lolgab lolgab requested a review from exoego October 15, 2025 11:18
Copy link
Contributor

@exoego exoego left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

codecov bot commented Oct 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.80%. Comparing base (2a028a1) to head (0f5ee01).
⚠️ Report is 31 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3726      +/-   ##
==========================================
+ Coverage   89.77%   89.80%   +0.02%     
==========================================
  Files         174      174              
  Lines        5055     5069      +14     
  Branches      447      493      +46     
==========================================
+ Hits         4538     4552      +14     
  Misses        517      517              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@exoego exoego merged commit 47b15c7 into scala-steward-org:main Oct 15, 2025
10 checks passed
@exoego exoego added enhancement New feature or request cat:build-tool labels Oct 15, 2025
@mzuehlke mzuehlke added this to the 0.37.0 milestone Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cat:build-tool enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants